package com.jvyou.controller;

import com.jvyou.service.MyTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 橘柚
 * @version 1.0-SNAPSHOT
 * @Date 2024/8/14 10:11
 * @Description
 */
@RestController
@RequestMapping("task")
public class TaskController {

    @Autowired
    private MyTaskService myTaskService;

    @GetMapping("execute")
    public String executeTasks() {
        myTaskService.executeTasks();
        return "success";
    }

    @GetMapping("schedule")
    public String scheduleTask() {
        myTaskService.scheduleTask();
        return "success";
    }
}
